import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/Index'
import Login from '@/pages/Login'
import agent from './agent'

Vue.use(Router)

const routes = [
  {
    path: '/',
    name: 'index',
    component: Index
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  }
]

Array.prototype.push.apply(routes, agent)

const JL_Router = new Router({
  mode: 'history',
  base: '/jlapp',
  routes: routes
})

export default JL_Router
